<?php

use think\facade\Route;

//首页
Route::get('/', 'index/index')->middleware('verify');

//定时测试
Route::group('test', function () {
    Route::get('/index', 'test/index');
    Route::post('/execute', 'test/execute');
})->middleware('verify')->ext('html');

//上传
Route::group('uploads', function () {
    Route::rule('/uploadImage', 'uploads/uploadImage');
})->ext('html');

Route::group('index', function () {
    Route::get('/index', 'index/index');
    Route::get('/welcome', 'index/welcome');
    Route::get('/clear_cache', 'index/clear_cache');
})->middleware('verify')->ext('html');

//登录
Route::group('login', function () {
    Route::get('/index', 'login/index');
    Route::post('/check', 'login/check');
    Route::post('/logout', 'login/logout');
})->ext('html');

//我的桌面
Route::group('desktop', function () {
    Route::get('/index', 'desktop/statistics');
})->middleware('verify')->ext('html');

Route::group('test', function () {
    Route::get('/index', 'test/index');
    Route::get('/getList', 'test/getList');
})->middleware('verify')->ext('html');

//会员管理
Route::group('user', function () {
    Route::get('/ordinary', 'user/ordinary');
    Route::get('/formal', 'user/formal');
    Route::get('/real', 'user/real');
    Route::get('/add', 'user/add');
    Route::get('/edit', 'user/edit');
    Route::post('/reset', 'user/reset');
    Route::post('/save', 'user/save');
    Route::post('/login', 'user/login');
    Route::rule('/recharge', 'user/recharge', 'POST|GET');
    Route::get('/export', 'user/export');
    Route::get('/getList', 'user/getList');
    Route::get('/login', 'user/login');
    Route::post('/update', 'user/update');
    Route::post('/delete', 'user/delete');
    Route::get('/getArea', 'user/getArea');

    Route::get('/agentMall', 'user/agentMall');
    Route::get('/getAgentMallList', 'user/getAgentMallList');

    Route::get('/agentContract', 'user/agentContract');
    Route::get('/getAgentContractList', 'user/getAgentContractList');
})->middleware('verify');

//推荐关系
Route::group('relation', function () {
    Route::get('/index', 'relation/index');
    Route::get('/algebra', 'relation/algebra');
    Route::get('/getData', 'relation/getData');
})->middleware('verify');

//推荐关系
Route::group('node', function () {
    Route::get('/index', 'node/index');
    Route::get('/algebra', 'node/algebra');
    Route::get('/getData', 'node/getData');
})->middleware('verify');

//财务管理
Route::group('account', function () {
    Route::get('/index', 'account/index');
    Route::get('/recharge', 'account/recharge');
    Route::get('/bonus', 'account/bonus');
    Route::get('/add', 'account/add');
    Route::get('/edit', 'account/edit');
    Route::get('/export', 'account/export');
    Route::get('/getList', 'account/getList');
})->middleware('verify');

//抽奖设置
Route::group('prize', function () {
    Route::get('/index', 'prize/index');
    Route::get('/getList', 'prize/getList');
    Route::get('/edit', 'prize/edit');
    Route::post('/save', 'prize/save');
})->middleware('verify');
//抽奖记录
Route::group('prizeRecord', function () {
    Route::get('/index', 'prizeRecord/index');
    Route::get('/getList', 'prizeRecord/getList');
})->middleware('verify');
//抽奖修改日志
Route::group('prizeLog', function () {
    Route::get('/index', 'prizeLog/index');
    Route::get('/getList', 'prizeLog/getList');
})->middleware('verify');

//视频会员充值记录
Route::group('orderVideo', function () {
    Route::get('/index', 'orderVideo/index');
    Route::get('/getList', 'orderVideo/getList');
})->middleware('verify');

//充值管理
Route::group('remit', function () {
    Route::get('/index', 'remit/index');
    Route::get('/add', 'remit/add');
    Route::get('/edit', 'remit/edit');
    Route::get('/export', 'remit/export');
    Route::get('/getList', 'remit/getList');
    Route::post('/save', 'remit/save');
    Route::post('/batch', 'remit/batch');
})->middleware('verify');

//提现管理
Route::group('draw', function () {
    Route::get('/index', 'draw/index');
    Route::get('/add', 'draw/add');
    Route::get('/edit', 'draw/edit');
    Route::get('/export', 'draw/export');
    Route::get('/getList', 'draw/getList');
    Route::post('/save', 'draw/save');
    Route::post('/batch', 'draw/batch');
})->middleware('verify');

//商户提现管理
Route::group('businessDraw', function () {
    Route::get('/index', 'businessDraw/index');
    Route::get('/add', 'businessDraw/add');
    Route::get('/edit', 'businessDraw/edit');
    Route::get('/export', 'businessDraw/export');
    Route::get('/getList', 'businessDraw/getList');
    Route::post('/save', 'businessDraw/save');
    Route::post('/batch', 'businessDraw/batch');
})->middleware('verify');

//转账管理
Route::group('transfer', function () {
    Route::get('/index', 'transfer/index');
    Route::get('/export', 'remit/export');
    Route::get('/getList', 'transfer/getList');
})->middleware('verify');

//转换管理
Route::group('exchange', function () {
    Route::get('/index', 'exchange/index');
    Route::get('/export', 'exchange/export');
    Route::get('/getList', 'exchange/getList');
})->middleware('verify');

//奖金管理-按会员
Route::group('summaryUser', function () {
    Route::get('/index', 'summaryUser/index');
    Route::get('/getList', 'summaryUser/getList');
    Route::get('/export', 'summaryUser/export');
    Route::get('/summary_info', 'summaryUser/summary_info');
})->middleware('verify');

//奖金管理-按日期
Route::group('summaryDate', function () {
    Route::get('/index', 'summaryDate/index');
    Route::get('/getList', 'summaryDate/getList');
    Route::get('/export', 'summaryDate/export');
    Route::get('/summary_info', 'summaryDate/summary_info');
})->middleware('verify');

//奖金管理-按月份
Route::group('summaryMonth', function () {
    Route::get('/index', 'summaryMonth/index');
    Route::get('/getList', 'summaryMonth/getList');
    Route::get('/export', 'summaryMonth/export');
    Route::get('/summary_info', 'summaryMonth/summary_info');
})->middleware('verify');

//奖金管理-按年份
Route::group('summaryYear', function () {
    Route::get('/index', 'summaryYear/index');
    Route::get('/getList', 'summaryYear/getList');
    Route::get('/export', 'summaryYear/export');
    Route::get('/summary_info', 'summaryYear/summary_info');
})->middleware('verify');

//新闻公告
Route::group('news', function () {
    Route::get('/index', 'news/index');
    Route::get('/getList', 'news/getList');
    Route::get('/add', 'news/add');
    Route::get('/edit', 'news/edit');
    Route::post('/save', 'news/save');
    Route::rule('/update', 'news/update');
    Route::post('/delete', 'news/delete');
})->middleware('verify');

//轮播管理
Route::group('carousel', function () {
    Route::get('/index', 'carousel/index');
    Route::get('/getList', 'carousel/getList');
    Route::get('/add', 'carousel/add');
    Route::get('/edit', 'carousel/edit');
    Route::post('/save', 'carousel/save');
    Route::rule('/update', 'carousel/update');
    Route::post('/delete', 'carousel/delete');
})->middleware('verify');

//广告管理
Route::group('ad', function () {
    Route::get('/index', 'ad/index');
    Route::get('/getList', 'ad/getList');
    Route::get('/add', 'ad/add');
    Route::get('/edit', 'ad/edit');
    Route::post('/save', 'ad/save');
    Route::rule('/update', 'ad/update');
    Route::post('/delete', 'ad/delete');
    Route::get('/selectProduct', 'ad/selectProduct');
})->middleware('verify');

//留言管理
Route::group('message', function () {
    Route::get('/index', 'message/index');
    Route::get('/getList', 'message/getList');
    Route::get('/add', 'message/add');
    Route::get('/edit', 'message/edit');
    Route::post('/save', 'message/save');
})->middleware('verify');

//消息管理
Route::group('notice', function () {
    Route::get('/group', 'notice/group');
    Route::get('/getData', 'notice/getData');
    Route::get('/show_order', 'notice/show_order');
    Route::get('/show_user', 'notice/show_user');
    Route::get('/show_message', 'notice/show_message');
    Route::get('/all_read', 'notice/all_read');
    Route::get('/noticeCount', 'notice/noticeCount');
})->middleware('verify');

//菜单管理
Route::group('menu', function () {
    Route::get('/index', 'menu/index');
    Route::get('/getList', 'menu/getList');
    Route::get('/add', 'menu/add');
    Route::get('/edit', 'menu/edit');
    Route::post('/save1', 'menu/save1');
    Route::rule('/update', 'menu/update');
    Route::post('/delete', 'menu/delete');
})->middleware('verify');

//快递管理
Route::group('express', function () {
    Route::get('/index', 'express/index');
    Route::get('/getList', 'express/getList');
    Route::get('/add', 'express/add');
    Route::get('/edit', 'express/edit');
    Route::post('/save', 'express/save');
    Route::rule('/update', 'express/update');
    Route::post('/delete', 'express/delete');
})->middleware('verify');

//网站配置
Route::group('config', function () {
    Route::get('/index', 'config/index');
    Route::get('/getList', 'config/getList');
    Route::get('/add', 'config/add');
    Route::get('/edit', 'config/edit');
    Route::post('/save', 'config/save');
    Route::post('/update', 'config/update');
    Route::post('/delete', 'config/delete');
    Route::get('/create', 'config/create');
    Route::post('/saveGroup', 'config/saveGroup');
})->middleware('verify');

//角色管理
Route::group('role', function () {
    Route::get('/index', 'role/index');
    Route::get('/getList', 'role/getList');
    Route::get('/add', 'role/add');
    Route::get('/edit', 'role/edit');
    Route::post('/save', 'role/save');
    Route::post('/update', 'role/update');
    Route::post('/delete', 'role/delete');
    Route::rule('/give', 'role/give');
})->middleware('verify');

//用户列表
Route::group('admin', function () {
    Route::get('/index', 'admin/index');
    Route::get('/getList', 'admin/getList');
    Route::get('/add', 'admin/add');
    Route::get('/edit', 'admin/edit');
    Route::post('/save', 'admin/save');
    Route::post('/update', 'admin/update');
    Route::post('/delete', 'admin/delete');
    Route::rule('/password', 'admin/password');
})->middleware('verify');

//版本管理
Route::group('version', function () {
    Route::get('/index', 'version/index');
    Route::get('/getList', 'version/getList');
    Route::get('/add', 'version/add');
    Route::get('/edit', 'version/edit');
    Route::post('/save', 'version/save');
    Route::post('/update', 'version/update');
    Route::post('/delete', 'version/delete');
})->middleware('verify');

//数据管理
Route::group('backup', function () {
    Route::get('/index', 'backup/index');
    Route::get('/add', 'backup/add');
    Route::get('/import', 'backup/import');
    Route::get('/clear', 'backup/clear');
    Route::get('/backup', 'backup/delete');
})->middleware('verify');

//操作日志
Route::group('logs', function () {
    Route::get('/index', 'logs/index');
    Route::get('/getList', 'logs/getList');
    Route::get('/queryIp', 'logs/queryIp');
})->middleware('verify');

//模板管理
Route::group('template', function () {
    Route::get('/index', 'template/index');
    Route::get('/getList', 'template/getList');
})->middleware('verify');

//银行管理
Route::group('bank', function () {
    Route::get('/index', 'bank/index');
    Route::get('/getList', 'bank/getList');
    Route::get('/add', 'bank/add');
    Route::get('/edit', 'bank/edit');
    Route::post('/save', 'bank/save');
    Route::rule('/update', 'bank/update');
    Route::post('/delete', 'bank/delete');
})->middleware('verify');

//代理设置
Route::group('area', function () {
    Route::get('/index', 'area/index');
    Route::get('/getList', 'area/getList');
    Route::get('/add', 'area/add');
    Route::get('/edit', 'area/edit');
    Route::post('/save1', 'area/save1');
    Route::rule('/update', 'area/update');
    Route::post('/delete', 'area/delete');
})->middleware('verify');

//分红池管理
Route::group('bonusPool', function () {
    Route::get('/index', 'bonusPool/index');
    Route::get('/getList', 'bonusPool/getList');
    Route::get('/summary_info', 'bonusPool/summary_info');
    Route::get('/add', 'bonusPool/add');
    Route::get('/edit', 'bonusPool/edit');
    Route::post('/save', 'bonusPool/save');
    Route::rule('/update', 'bonusPool/update');
    Route::post('/delete', 'bonusPool/delete');
})->middleware('verify');

//合约专区-分红池记录管理
Route::group('contractBonusPoolRecord', function () {
    Route::get('/index', 'contractBonusPoolRecord/index');
    Route::get('/getList', 'contractBonusPoolRecord/getList');
    Route::get('/export', 'contractBonusPoolRecord/export');
})->middleware('verify');

//合约专区-分红池管理
Route::group('contractBonusPool', function () {
    Route::get('/index', 'contractBonusPool/index');
    Route::get('/getList', 'contractBonusPool/getList');
    Route::get('/summary_info', 'contractBonusPool/summary_info');
    Route::get('/add', 'contractBonusPool/add');
    Route::get('/edit', 'contractBonusPool/edit');
    Route::post('/save', 'contractBonusPool/save');
    Route::rule('/update', 'contractBonusPool/update');
    Route::post('/delete', 'contractBonusPool/delete');
})->middleware('verify');

//分红池记录管理
Route::group('bonusPoolRecord', function () {
    Route::get('/index', 'bonusPoolRecord/index');
    Route::get('/getList', 'bonusPoolRecord/getList');
    Route::get('/export', 'bonusPoolRecord/export');
})->middleware('verify');

//合约专区-股权资料
Route::group('stockRight', function () {
    Route::get('/index', 'stockRight/index');
    Route::get('/getList', 'stockRight/getList');
    Route::get('/add', 'stockRight/add');
    Route::get('/edit', 'stockRight/edit');
    Route::post('/save', 'stockRight/save');
    Route::rule('/update', 'stockRight/update');
    Route::post('/delete', 'stockRight/delete');
})->middleware('verify');

//合约专区-团队等级
Route::group('contractLevel', function () {
    Route::get('/index', 'contractLevel/index');
    Route::get('/getList', 'contractLevel/getList');
    Route::get('/edit', 'contractLevel/edit');
    Route::post('/save', 'contractLevel/save');
})->middleware('verify');

//合约专区-分红等级
Route::group('contractBonusLevel', function () {
    Route::get('/index', 'contractBonusLevel/index');
    Route::get('/getList', 'contractBonusLevel/getList');
    Route::get('/edit', 'contractBonusLevel/edit');
    Route::post('/save', 'contractBonusLevel/save');
})->middleware('verify');

//会员等级
Route::group('userLevel', function () {
    Route::get('/index', 'userLevel/index');
    Route::get('/getList', 'userLevel/getList');
    Route::get('/edit', 'userLevel/edit');
    Route::post('/save', 'userLevel/save');
})->middleware('verify');

//盟主分红等级
Route::group('userLevelBonus', function () {
    Route::get('/index', 'userLevelBonus/index');
    Route::get('/getList', 'userLevelBonus/getList');
    Route::get('/edit', 'userLevelBonus/edit');
    Route::post('/save', 'userLevelBonus/save');
})->middleware('verify');

//盟主标志等级
Route::group('userLevelFlag', function () {
    Route::get('/index', 'userLevelFlag/index');
    Route::get('/getList', 'userLevelFlag/getList');
    Route::get('/edit', 'userLevelFlag/edit');
    Route::post('/save', 'userLevelFlag/save');
})->middleware('verify');

//视频会员等级
Route::group('userLevelVideo', function () {
    Route::get('/index', 'userLevelVideo/index');
    Route::get('/getList', 'userLevelVideo/getList');
    Route::get('/edit', 'userLevelVideo/edit');
    Route::post('/save', 'userLevelVideo/save');
})->middleware('verify');

//视频管理
Route::group('video', function () {
    Route::get('/apply', 'video/apply');
    Route::get('/index', 'video/index');
    Route::get('/getList', 'video/getList');
    Route::post('/audit', 'video/audit');
    Route::rule('/edit', 'video/edit');
    Route::rule('/update', 'video/update');
})->middleware('verify');

//视频分类管理
Route::group('videoCate', function () {
    Route::get('/index', 'videoCate/index');
    Route::get('/getList', 'videoCate/getList');
    Route::rule('/add', 'videoCate/add');
    Route::rule('/edit', 'videoCate/edit');
    Route::post('/save', 'videoCate/save');
    Route::post('/delete', 'videoCate/delete');
})->middleware('verify');

//统计管理
Route::group('statistics', function () {
    Route::get('/user', 'statistics/user');
    Route::get('/userYear', 'statistics/userYear');
    Route::get('/userMonth', 'statistics/userMonth');
    Route::get('/getUserList', 'statistics/getUserList');

    Route::get('/priceYear', 'statistics/priceYear');
    Route::get('/priceMonth', 'statistics/priceMonth');
    Route::get('/getPriceList', 'statistics/getPriceList');

    Route::get('/productCost', 'statistics/productCost');

    Route::get('/cateUserYear', 'statistics/cateUserYear');
    Route::get('/cateUserMonth', 'statistics/cateUserMonth');
    Route::get('/catePriceYear', 'statistics/catePriceYear');
    Route::get('/catePriceMonth', 'statistics/catePriceMonth');
    Route::get('/getCateList', 'statistics/getCateList');

    Route::get('/productUserYear', 'statistics/productUserYear');
    Route::get('/productUserMonth', 'statistics/productUserMonth');
    Route::get('/productPriceYear', 'statistics/productPriceYear');
    Route::get('/productPriceMonth', 'statistics/productPriceMonth');
    Route::get('/getProductList', 'statistics/getProductList');

    Route::get('/areaUserYear', 'statistics/areaUserYear');
    Route::get('/areaUserMonth', 'statistics/areaUserMonth');
    Route::get('/areaPriceYear', 'statistics/areaPriceYear');
    Route::get('/areaPriceMonth', 'statistics/areaPriceMonth');
    Route::get('/getAreaList', 'statistics/getAreaList');

    /** 默认不展示数据，根据时间段搜索后，统计并显示时间段内消费过的盟主、市代、区代的编号、昵称、用户名、手机号、消费金额 */
    Route::get('/userConsumed', 'statistics/userConsumed');
    Route::get('/getUserConsumed', 'statistics/getUserConsumed');
})->middleware('verify');

//抵扣券
Route::group('userDiscount', function () {
    Route::get('/index', 'userDiscount/index');
    Route::get('/getList', 'userDiscount/getList');
})->middleware('verify');

//等级更新记录
Route::group('userLevelLog', function () {
    Route::get('/index', 'userLevelLog/index');
    Route::get('/getList', 'userLevelLog/getList');
})->middleware('verify');

//盟主月份消费业绩
Route::group('LeaderConsumeMonth', function () {
    Route::get('/index', 'LeaderConsumeMonth/index');
    Route::get('/getList', 'LeaderConsumeMonth/getList');
    Route::rule('/add', 'LeaderConsumeMonth/add');
    Route::rule('/edit', 'LeaderConsumeMonth/edit');
    Route::post('/save', 'LeaderConsumeMonth/save');
    Route::post('/delete', 'LeaderConsumeMonth/delete');
})->middleware('verify');

//实名认证
Route::group('userAuth', function () {
    Route::get('/index', 'userAuth/index');
    Route::get('/getList', 'userAuth/getList');
    Route::get('/edit', 'userAuth/edit');
    Route::post('/save', 'userAuth/save');
})->middleware('verify');
